<link href="../addons/jy_baojdai/custom/templates/mobile/style.css?v=201905251730" rel="stylesheet">
<style>
.fui-header a.back:before {
    border-color: #fff;
}
</style>
<div class="fui-page fui-page-current page-commission-down">
	<div class="fui-header sysbgcolor">
        <div class="fui-header-left">
            <a class="back" style="color:#fff" ng-click="goback();"></a>
        </div>
        <div class="title" style="color:#fff">{{pagedata.setting.commission_total}}：+{{pagedata.commission_money}}元</div>
    </div>
    <div class="fui-content">
		<div class="fui-tab fui-tab-danger" id="tab">
            <a ng-click="pagedata.params.show=0;pagedata.get_list()" ng-class="{'active':pagedata.params.show!=1}" href="javascript:;">明细</a>
			<a ng-click="pagedata.params.show=1;pagedata.get_list()" ng-class="{'active':pagedata.params.show==1}" href="javascript:;">日统计</a>
		</div>
        <div ng-if="pagedata.params.show!=1 && pagedata.pluginset.isorderall!=1" class="fui-tab fui-tab-danger" id="tab">
            <a ng-click="pagedata.params.type=1;pagedata.get_list()" ng-class="{'active':pagedata.params.type==1}" href="javascript:;">推荐奖</a>
			<a ng-click="pagedata.params.type=2;pagedata.get_list()" ng-class="{'active':pagedata.params.type==2}" href="javascript:;">级差奖</a>
			<a ng-click="pagedata.params.type=3;pagedata.get_list()" ng-class="{'active':pagedata.params.type==3}" href="javascript:;">培训奖</a>
			<a ng-click="pagedata.params.type=4;pagedata.get_list()" ng-class="{'active':pagedata.params.type==4}" href="javascript:;">平超奖</a>
			<a ng-click="pagedata.params.type=5;pagedata.get_list()" ng-class="{'active':pagedata.params.type==5}" href="javascript:;">管理奖</a>
		</div>
		<div ng-if="pagedata.params.show!=1" style="padding:0.5rem;margin-top:-0.5rem">
			<div ng-repeat="item in pagedata.list" class="fui-list-group radius" id="container" >
				<div class="fui-list" style="height: auto">
					<div class="fui-list-inner">
						<div class="text bold">
							 {{item.createtime}}
						</div>
						<div ng-if="pagedata.pluginset.isorderall!=1" class="subtitle" style="font-size: 0.6rem;">
							{{item.ordersn}}
						</div>
						<div ng-if="pagedata.pluginset.isorderall!=1" class="subtitle" style="font-size: 0.6rem;color:red">
							{{item.typetitle}}
						</div>
						<div class="subtitle" style="font-size: 0.6rem;color:red">
							额度:￥{{item.money || '0.00'}}
						</div>
					</div>
					<div  class="row-remark" style="min-width:2rem;">
						<div class="label label-info">{{item.statustitle}}</div>
					</div>
				</div>
			</div>
			<div class='infinite-loading' style="display:none" id="loading_show"><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
			<div ng-if="pagedata.list.length==0" class='content-empty' >
				<i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i>
				<br/>
				<p style="color: #999;font-size: .75rem">暂时没有任何数据</p>
			</div>
		</div>
		<div ng-if="pagedata.params.show==1" style="padding:0.5rem;margin-top:-0.5rem">
			<div ng-repeat="item in pagedata.list" class="fui-cell-group radius" id="container" >
				<div class="fui-cell" style="height: 3.5rem">
					<div class="fui-cell-text">
						<div class="text bold">
							 {{item.day}}
						</div>
						<div class="subtitle" style="font-size: .55rem;color:red">
							总收益
						</div>
					</div>
					<div class="fui-cell-remark" style="color:red" ng-click="pagedata.showitem=true;pagedata.getitem(item.day)">
						￥{{item.money || '0.00'}}
					</div>
				</div>
			</div>
			<div class='infinite-loading' style="display:none" id="loading_show"><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
			<div ng-if="pagedata.list.length==0" class='content-empty' >
				<i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i>
				<br/>
				<p style="color: #999;font-size: .75rem">暂时没有任何数据</p>
			</div>
		</div>
    </div>
</div>
<div ng-if="pagedata.showitem && pagedata.pluginset.isorderall!=1" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showitem=false"></i>
			<div class="fui-cell-group radius" style="max-height:20rem;overflow-y:scroll">
				<div ng-repeat="item in pagedata.dayinfo" class="fui-cell">
					<div class="fui-cell-text">
						<div class="subtitle" style="font-size: .55rem;color:red">
							{{item.typetitle}}
						</div>
					</div>
					<div class="fui-cell-remark noremark" style="color:red">
						<span ng-if="item.isjifen!=1">￥{{item.money || '0.00'}}</span>
						<span ng-if="item.isjifen==1">{{item.jifen || '0.00'}}个</span>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.geturl='jy_baojdai/order/list/';
scope.pagedata.get_list=function(){
	if(scope.pagedata.params.show==1){
		scope.pagedata.geturl='jy_baojdai/order/daylist/';
	}else{
		scope.pagedata.geturl='jy_baojdai/order/list/';
	}
	console.log(scope.pagedata.geturl);
	scope.tool.get_list(scope.pagedata.geturl,true);
}
scope.tool.get_list(scope.pagedata.geturl,true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list(scope.pagedata.geturl);
}
scope.pagedata.getitem=function(day){
	scope.pagedata.dayinfo=[];
	scope.get('jy_baojdai/order/getitem/day='+day,function(res){
		scope.pagedata.dayinfo=res;
		scope.$evalAsync();
	});
}
</script>

